<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>blmc_drivers: osi Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">blmc_drivers
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="namespaces.html"><span>Namespace&#160;List</span></a></li>
      <li><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('namespaceosi.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">osi Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Common include.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ac3d484da0f89f06e329d4b84d7459d9b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac3d484da0f89f06e329d4b84d7459d9b"></a>
typedef std::mutex&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceosi.html#ac3d484da0f89f06e329d4b84d7459d9b">Mutex</a></td></tr>
<tr class="memdesc:ac3d484da0f89f06e329d4b84d7459d9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wrapper around the posix specific Mutex implementation. <br /></td></tr>
<tr class="separator:ac3d484da0f89f06e329d4b84d7459d9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31b1ce104b168554e4832b5d3b684073"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31b1ce104b168554e4832b5d3b684073"></a>
typedef std::condition_variable&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceosi.html#a31b1ce104b168554e4832b5d3b684073">ConditionVariable</a></td></tr>
<tr class="memdesc:a31b1ce104b168554e4832b5d3b684073"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wrapper around the posix specific ConditionVariable implementation. <br /></td></tr>
<tr class="separator:a31b1ce104b168554e4832b5d3b684073"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a001686caee0f34611f14ab94c7303254"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceosi.html#a001686caee0f34611f14ab94c7303254">send_to_can_device</a> (int fd, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)</td></tr>
<tr class="memdesc:a001686caee0f34611f14ab94c7303254"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use the osi workspace API to communicate with the can bus.  <a href="#a001686caee0f34611f14ab94c7303254">More...</a><br /></td></tr>
<tr class="separator:a001686caee0f34611f14ab94c7303254"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92dc20de3b4933a10f24c98cecf2568b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceosi.html#a92dc20de3b4933a10f24c98cecf2568b">close_can_device</a> (int socket)</td></tr>
<tr class="memdesc:a92dc20de3b4933a10f24c98cecf2568b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is closing a socket on the Can device.  <a href="#a92dc20de3b4933a10f24c98cecf2568b">More...</a><br /></td></tr>
<tr class="separator:a92dc20de3b4933a10f24c98cecf2568b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a244466c0afc9ae9fe059cee665fb0603"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceosi.html#a244466c0afc9ae9fe059cee665fb0603">receive_message_from_can_device</a> (int fd, struct msghdr *msg, int flags)</td></tr>
<tr class="memdesc:a244466c0afc9ae9fe059cee665fb0603"><td class="mdescLeft">&#160;</td><td class="mdescRight">Poll? a message from the CAN device.  <a href="#a244466c0afc9ae9fe059cee665fb0603">More...</a><br /></td></tr>
<tr class="separator:a244466c0afc9ae9fe059cee665fb0603"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48e36c862c77befc86f53140722c3f43"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a48e36c862c77befc86f53140722c3f43"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceosi.html#a48e36c862c77befc86f53140722c3f43">initialize_realtime_printing</a> ()</td></tr>
<tr class="memdesc:a48e36c862c77befc86f53140722c3f43"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is needed in xenomai to initialize the real time console display of text. <br /></td></tr>
<tr class="separator:a48e36c862c77befc86f53140722c3f43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a499cdf6336a907d1327044b0f595f3a9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceosi.html#a499cdf6336a907d1327044b0f595f3a9">sleep_ms</a> (const double &amp;sleep_time_ms)</td></tr>
<tr class="memdesc:a499cdf6336a907d1327044b0f595f3a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function uses eather the xenomai API or the posix one.  <a href="#a499cdf6336a907d1327044b0f595f3a9">More...</a><br /></td></tr>
<tr class="separator:a499cdf6336a907d1327044b0f595f3a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2409ab591c4f78d9a8bcfbbe38df9429"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceosi.html#a2409ab591c4f78d9a8bcfbbe38df9429">get_current_time_ms</a> ()</td></tr>
<tr class="memdesc:a2409ab591c4f78d9a8bcfbbe38df9429"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current time in millisecond.  <a href="#a2409ab591c4f78d9a8bcfbbe38df9429">More...</a><br /></td></tr>
<tr class="separator:a2409ab591c4f78d9a8bcfbbe38df9429"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6772d4aea95e99bc2bd0aabc557a20e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af6772d4aea95e99bc2bd0aabc557a20e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceosi.html#af6772d4aea95e99bc2bd0aabc557a20e">make_this_thread_realtime</a> ()</td></tr>
<tr class="memdesc:af6772d4aea95e99bc2bd0aabc557a20e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This methd is requiered in xenomai to create a real time thread. <br /></td></tr>
<tr class="separator:af6772d4aea95e99bc2bd0aabc557a20e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Common include. </p>
<p>osi stands for Operating System Interface. </p><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000003">Todo:</a></b></dt><dd>This workspace should be replaced eventually by the real_time_tools package. </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a92dc20de3b4933a10f24c98cecf2568b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void osi::close_can_device </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>socket</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This function is closing a socket on the Can device. </p>
<p>It is os independent.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">socket</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2409ab591c4f78d9a8bcfbbe38df9429"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double osi::get_current_time_ms </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the current time in millisecond. </p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000005">Todo:</a></b></dt><dd>remove as the one form the Timer class is much better embeded.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>double which is the time in milli second </dd></dl>

</div>
</div>
<a class="anchor" id="a244466c0afc9ae9fe059cee665fb0603"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void osi::receive_message_from_can_device </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct msghdr *&#160;</td>
          <td class="paramname"><em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Poll? a message from the CAN device. </p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000004">Todo:</a></b></dt><dd>Manuel can you confrim this? And precise the arguments of the function?</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td></td></tr>
    <tr><td class="paramname">msg</td><td></td></tr>
    <tr><td class="paramname">flags</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a001686caee0f34611f14ab94c7303254"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void osi::send_to_can_device </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct sockaddr *&#160;</td>
          <td class="paramname"><em>to</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">socklen_t&#160;</td>
          <td class="paramname"><em>tolen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Use the osi workspace API to communicate with the can bus. </p>
<p>/todo Manuel can you describe the argument of this function? </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td></td></tr>
    <tr><td class="paramname">buf</td><td></td></tr>
    <tr><td class="paramname">len</td><td></td></tr>
    <tr><td class="paramname">flags</td><td></td></tr>
    <tr><td class="paramname">to</td><td></td></tr>
    <tr><td class="paramname">tolen</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a499cdf6336a907d1327044b0f595f3a9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void osi::sleep_ms </td>
          <td>(</td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>sleep_time_ms</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This function uses eather the xenomai API or the posix one. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sleep_time_ms</td><td>is the sleeping time in milli seconds. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceosi.html">osi</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
